<?php
namespace myapp\admin\controller;
use think\Controller;
use think\Db;

class Index extends Controller

{
    public function index()
    {
        //获取 参数方法
        $name = input('username');
        //对模板变量进行赋值
        $this->assign('name',$name);

        $db1 = Db::connect('db_config1'); 
        
		$user = $db1->name('member')->where('username',$name)->select(); 
		//$user = db('member')->where('id',2)->find();

		$db2 = Db::connect('db_config2');

		$muser = $db2->name('c2')->where('name','user1')->select(); 
       var_dump($muser);


        //显示模板
        return view();
        
    }
}